package com.api.shopapi.service;

import com.alibaba.fastjson.JSONArray;
import com.api.shopapi.entity.GoodsClassGovernment;
import com.api.shopapi.entity.dto.GoodsClassGovernmentDTO;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface GoodsClassGovernmentService {

    int insert(String governmentCode, JSONArray goodsClassCodeList);

    int update(GoodsClassGovernment goodsClassGovernment);

    GoodsClassGovernment getByGoodsClassGovernmentCode(String goodsClassGovernmentCode);

    GoodsClassGovernment getByName(String name,String governmentCode);

    List<GoodsClassGovernment> getListByGovernmentCode(String governmentCode);


    List<GoodsClassGovernmentDTO> getAllListByParentGoodsClassCode(String governmentCode, String parentGoodsClassCode);

    List<GoodsClassGovernmentDTO> getListByParentGoodsClassCode(String governmentCode, String parentGoodsClassCode);

    PageInfo<GoodsClassGovernment> getPageList(int pageIndex,int pageSize,String governmentCode,String name,int status);

    PageInfo<GoodsClassGovernmentDTO> getPageListByParentGoodsClassCode(int pageIndex,int pageSize,String governmentCode,String name,String parentGoodsClassCode);

    List<GoodsClassGovernment> getSecondClassList(String governmentCode,String parentGoodsClassCode);

    List<GoodsClassGovernment> getFirstClassList(String governmentCode,String parentGoodsClassCode);


}
